/**
 * Package for base classes and control classes for the Due Dates project.
 */
package edu.hawaii.duedates;

import java.util.ArrayList;
import java.util.List;

/**
 * Holds the list of commands and parameters for the DueDates class to use.
 * 
 * @author Aric West
 * @author Daniel Tian
 *
 */
public class DueDatesOption {
  private final String command;
  private final List<String> parameterList = new ArrayList<String>();
    
  /**
   * Constructor.
   * 
   * @param parameters List of strings containing the command first followed by it's arguments.
   */
  public DueDatesOption(List<String> parameters) {
    this.command = parameters.get(0);
    this.parameterList.addAll(parameters);
    this.parameterList.remove(0);
  }
  
  /**
   * Returns the option stored in this instance.
   * 
   * @return The option stored in this instance.
   */
  public String getCommand() {
    return this.command;
  }
  
  /**
   * Returns a list of the parameters associated with this option.
   * 
   * @return A list of Strings corresponding to the parameters passed.
   */
  public List<String> getParameters() {
    return this.parameterList;
  }
  
  /**
   * Get the parameter specified at a certain position in the list of parameters.
   * 
   * @param index The position of the argument.
   * @return A String of the argument at the given index.
   */
  public String getParameterAt(int index) {
    return parameterList.get(index);
  }
}
